#pragma once
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include "log_def.h"
#include "libevent_cpp/include/include_all.h"
#include "svr_util/include/su_include.h"
#include "../acc_proto/include/proto.h"
#include "../external/rpc_libevent_cpp/src/RpcNet.h"



//RPC连接内部服务器
//连接内网svr的sever connect
class InnerSvrCon : public RpcConToClient<InnerSvrCon>
{
private:
	uint16 m_svrId = 0;		//保持注册成功的id
	uint8 m_svrType = 0;
	bool m_isVerify = false;	//true 表示 为验证服务器

public:
	virtual ~InnerSvrCon() override;
	bool RegSvrId(uint16 mainCmd, uint16 id);
	//return 0 表示未注册
	uint16 GetSvrId() const { return m_svrId; }
	bool IsReg() const {return m_svrId != 0; }
	void SetVerifySvr();
	bool IsVerifySvr() const { return m_isVerify; }
	virtual void OnCon() override{}
};

namespace AccRpcSvr
{
	void Init();
};